import request from '@/utils/request';

export async function queryRule(params) {
  let obj = {
    page: params.current||1,
    limit: params.pageSize||30,
  };
  Object.assign(params, obj);
  delete params.current;
  delete params.pageSize;
  return request('/goods/goodsBrand/page', {
    params,
  });
}
export async function removeRule(params) {
  return request(`/goods/goodsBrand/${params}`, {
    method: 'DELETE',
  });
}
export async function addRule(params) {
  return request('/goods/goodsBrand', {
    method: 'POST',
    data: {
      ...params,
    },
  });
}
export async function updateRule(params) {
  return request('/goods/goodsBrand', {
    method: 'PUT',
    data: {
      ...params,
    },
  });
}
